import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'



const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/homepage',
    children:[
      {path: '/homepage', component: () => import('../views/homepage/HomePageView.vue')},
      {path: '/employeemanagement', component: () => import('@/views/employeemanagement/EmployeeManagement.vue')},
      {path: '/checkManagement', component: () => import('../views/qualitymanagement/CheckView.vue')},
      {path: '/applicationManagement', component: () => import('../views/qualitymanagement/ApplicationView.vue')},
      {path: '/experimentEquipment', component: () => import('@/views/experiment/ExperimentEquipment.vue'),},
      {path: '/experimentLedger', component: () => import('@/views/experiment/ExperimentLedger.vue'),},
      {path: '/acceptancemanagement', component: () => import('../views/acceptancemanagement/AcceptanceManagement.vue')},
      {path: '/materialsmanagement', component: () => import('../views/materialsmanagement/MaterialsManagement.vue'),}
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router